Skip to content

feat: make next-auth peer dependency optional#1073

Merged
phoenix-ru merged 2 commits intosidebase:chore/bump-dependencies-and-use-module-builder-v1from
conarti:enh/1071-optional-next-auth-peer-dep
Jan 22, 2026
Merged

feat: make next-auth peer dependency optional#1073
phoenix-ru merged 2 commits intosidebase:chore/bump-dependencies-and-use-module-builder-v1from
conarti:enh/1071-optional-next-auth-peer-dep

Conversation

@conarti
Copy link
Contributor

@conarti conarti commented Dec 24, 2025

🔗 Linked issue

#1071

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Added peerDependenciesMeta to make next-auth an optional peer dependency.

This prevents automatic installation of next-auth (~50MB including Next.js) for users who only use the local provider.

Before: next-auth is always installed automatically (npm v7+ behavior)
After: next-auth is only installed when explicitly added by users who need the authjs provider

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@Thomas-Philippot
Copy link
Contributor

I would love to see this merged as it also avoid nextjs vulnerabilities

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 22, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@sidebase/nuxt-auth@1073

commit: a52fbe5

@phoenix-ru phoenix-ru changed the base branch from main to chore/bump-dependencies-and-use-module-builder-v1 January 22, 2026 09:51
@phoenix-ru
Copy link
Collaborator

Thank you a lot for the good catch @conarti!
I've changed the base for this PR to a dep upgrade PR so that we can test both together. We'll try to merge and release it soon

@phoenix-ru phoenix-ru merged commit 419d775 into sidebase:chore/bump-dependencies-and-use-module-builder-v1 Jan 22, 2026
2 checks passed
phoenix-ru added a commit that referenced this pull request Jan 30, 2026
* chore: bump dependencies and switch to Nuxt Module Builder v1

* chore: upgrade and re-run linter

* chore: update pkg-pr-new workflow

* chore: apply supply chain attack mitigations

* chore: do one more package update

* chore: do another incremental update

* feat: make next-auth peer dependency optional (#1073)

Co-authored-by: Aleksandr Belous <a.belous@localtrip.ru>

* chore: fix Nuxt warning in playground

* chore: run pnpm dedupe

---------

Co-authored-by: Aleksandr Belous <72551740+conarti@users.noreply.github.com>
Co-authored-by: Aleksandr Belous <a.belous@localtrip.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add peerDependenciesMeta to make next-auth optional for local provider

3 participants